#include<iostream>
using namespace std;

void teststring1()
{
	string s("hello world!!");
	cout << "The string is " << s << endl;
	cout << "The string size is " << s.size() << endl;
	cout << "The string lengrh is " << s.length() << endl;
	cout << "The string capacity is " << s.capacity() << endl;

	cout << s.empty() << endl;
	s.clear();
	cout << "The string size is " << s.size() << endl;
	cout << "The string capacity is " << s.capacity() << endl;
	
}

void teststring2()
{
	string s;
	s.reserve(100);
	cout << "The string size is " << s.size() << endl;
	cout << "The string capacity is " << s.capacity() << endl;

	s.reserve(50);
	cout << "The string size is " << s.size() << endl;
	cout << "The string capacity is " << s.capacity() << endl;

	s.reserve(5);
	cout << "The string size is " << s.size() << endl;
	cout << "The string capacity is " << s.capacity() << endl;

	//s[100] = 'x';
}

void teststring3()
{
	string s;
	s.resize(20);

	string s1;
	s1.resize(20, 'a');

	string s2("hello ");
	s2.resize(20, 'a');

}

int main()
{
	//teststring1();
	//teststring2();
	teststring3();
	return 0;
}